package com.naiterui.ehp.bs.recommend.remote;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import com.naiterui.ehp.bp.bo.pharmacist.PharmacistInfoBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.recommend.vo.PharmacistVO;

/**
 * @author guoyongxiang
 * @date 2019/12/9 17:26
 * @since 1.0.0
 */
@FeignClient(name = "recommendPharmacist", url = "${ehp.domain.pharmacist}", configuration = FeignConfiguration.class)
public interface IPharmacistFeignClient {

    /**
     * 获取可审核药师列表
     *
     * @param count
     *
     * @return
     */
    @GetMapping("inner/recom/audit/pharmacist")
    List<PharmacistVO> getAuditPharmacist(@RequestParam("count") Integer count) throws BusinessException;

    /**
     * 获取药师基本信息
     * @param pharmacistId
     * @return
     */
    @RequestMapping("/inner/recom/user/info")
    PharmacistInfoBO getPharmacistInfo(@RequestParam("pharmacistId") Long pharmacistId);

    @PostMapping("inner/recom/user/list/info")
    List<PharmacistInfoBO> getPharmacistInfoList(@RequestBody List<Long> pharmacistIds);

    /**
     * 自动审核
     * @param recomId
     * @param skuIds
     * @throws BusinessException
     */
    @PostMapping("inner/recommend/auto/audit")
    void autoAudit(@RequestParam("recomId") String recomId, @RequestParam("skuIds") String skuIds) throws BusinessException;
}
